    package com.shou.mapper;

    import com.shou.pojo.Activity;
    import com.shou.pojo.User;
    import org.apache.ibatis.annotations.Mapper;

    import java.util.List;
@Mapper
    public interface UserMapper {


            // 其他数据库操作方法...

            // 申请加入活动
            void applyForActivity(int userId, int activityId);

            // 取消参加活动
            void cancelParticipation(int userId, int activityId);

            // 查看参与的活动
            List<Activity> getParticipatedActivities(int userId);

            // 申请一个活动
            void applyForNewActivity(int userId, int activityId);


    int registerUser(User user);

    User getUserByUsername(String username);


    User findByUsername(String username);

    void addActivityToUser(int userId, Activity activity);

    void removeActivityFromUser(int userId, int activityId);

    User findById(int id);
}
